<?php 

include("files/php/global.php"); 
printHeader();
session_start();
LoadDataDb();
loadRubrica();
$_SESSION['LISTA_RUBRICA_SMS']=$LISTA_RUBRICA_SMS;
$_SESSION['LISTA_RUBRICA_EMAIL']=$LISTA_RUBRICA_EMAIL;
$_SESSION['LISTA_RUBRICA_FAX']=$LISTA_RUBRICA_FAX;
$_SESSION['LISTA_ALR_ENABLE_SMS']=$LISTA_ALR_ENABLE_SMS;
$_SESSION['LISTA_ALR_ENABLE_FAX']=$LISTA_ALR_ENABLE_FAX;
$_SESSION['LISTA_ALR_ENABLE_EMAIL']=$LISTA_ALR_ENABLE_EMAIL;
$arr_menu=array("","","");
$menu=0;
if(isset($_GET["menu"]))
    $menu=($_GET["menu"]);
if(2 == $menu)
    $arr_menu[1]="class=\"selected\"";
else if(3 == $menu)
    $arr_menu[2]="class=\"selected\"";
else
    $arr_menu[0]="class=\"selected\"";
?>

<head>

<!-- Javascript -->
<script language=JavaScript src="./files/js/alarm_ajax.js"></script>

<script type="text/javascript" src="./files/js/jquery-1.4.2.js"></script>

<link rel="stylesheet" href="./style/vtabs.css" type="text/css" />

<script src="files/js/alarm_ajax.js" type="text/javascript"></script>
<script src="files/js/jquery-1.4.2.js" type="text/javascript"></script>
<script src="files/js/jquery.tools.min.js" type="text/javascript"> </script>
<script type="text/javascript" src="files/js/jquery.tablesorter.js" > </script>
<script type="text/javascript" src="files/js/jquery.tablesorter.pager.js" > </script>


<script type="text/javascript">
    var num=Math.random();
    
    function parseGetVars()
    {
      // creo una array
      var args = new Array();
      var query = window.location.search.substring(1);
      if (query)
      {
        var strList = query.split('&');
        for(str in strList)
        {
          var parts = strList[str].split('=');
          args[unescape(parts[0])] = unescape(parts[1]);
        }
      }
      return args;
    }
   

    $(document).ready(function() {
        var get = parseGetVars();
        var sito = get['menu'];
        switch(sito)
        {
            case "2":
                loadArchivioTab('files/php/index_rubrica_fax.php?idParse=1'+num,'showDivRubrica');
            break;
            case "3":
                loadArchivioTab('files/php/index_rubrica_email.php?idParse=1'+num,'showDivRubrica');
            break;
            default:
                loadArchivioTab('files/php/index_rubrica_sms.php?idParse=1'+num,'showDivRubrica');
            break;
        }
       
        $("#vtab-column ul li").click(function() {
           if($("#vtab-column ul li") != null)
           {
               for(i=0; i < $("#vtab-column ul li").length; i++) 
               {
                    $("#vtab-column ul li")[i].getAttribute('class');
                    $("#vtab-column ul li")[i].removeAttribute('class');//.removeClass("selected"); //Remove any "active" class
               }
               $(this).addClass("selected"); //Add "active" class to selected tab
               return true;
           }
        });	
    });
   
</script>

</head>

	<div id="vtab-column">
			<ul class="tabs"> <!-- class=\"selected\" -->
                             <li <?php echo $arr_menu[0]; ?> > 
                                <a href="javascript:void(0);" onclick="javascript:loadArchivioTab('files/php/index_rubrica_sms.php?idParse=1','showDivRubrica');">Rubrica Sms</a>
                             </li>
                             <li <?php echo $arr_menu[1]; ?> >  
                                <a href="javascript:void(0);" onclick="javascript:loadArchivioTab('files/php/index_rubrica_fax.php?idParse=1','showDivRubrica');">Rubrica Fax</a>
                             </li>
                             <li <?php echo $arr_menu[2]; ?> >  
                                <a href="javascript:void(0);" onclick="javascript:loadArchivioTab('files/php/index_rubrica_email.php?idParse=1','showDivRubrica');">Rubrica Email</a>
                             </li>
                        </ul>
	</div>
	  
        <div id="showDivRubrica">  </div>
        
</body>
	
</html>